#ifndef __AUTH_PLUGIN_H__
#define __AUTH_PLUGIN_H__

#include <cstdint>
#include <map>
#include <mutex>

#include "Expand/IPlugin.h"
#include "Engine/GameGuid.h"


using namespace PocketSurvival::Engine;

namespace PocketSurvival
{
    class AuthPlugin : public IPlugin
    {
    protected:
        std::mutex m_mapMutex;
        std::map<GameGuid, uint32_t> m_authMap;
    public:
        virtual const std::string &getPluginName() override;
        virtual const std::string &getIntroduce() override;
        virtual uint32_t getUseAuthLevel() override;
        virtual AuthDisplayType getDisplayType() override;
        virtual void processCmd(ChatObj &chatObj, std::vector<std::string> &cmdDataVec) override;

        virtual void getCmds(std::vector<std::string> &cmdVec) override;
        virtual void load() override;
        virtual void save() override;
        uint32_t getLevelByGuid(const GameGuid& guid);
    };
    
}

#endif
